<template>
	<view class="cardstyle">
		<text class="titlebox">{{title}}</text>
		<view class="tipsbox">
			<text style="color:red" v-if="isTop">置顶</text>
			<text>{{author}}</text>
			<text>{{comments}}评</text>
			<view style="flex:1;display:flex;justify-content: flex-end;">
				<text>{{time}}</text>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		name: "cardViewText",
		props: {
			title: {
				type: String,
				default: "标题测试"
			},
			isTop: {
				type: Boolean,
				default: true
			},
			author: {
				type: String,
				default: "新华社"
			},
			comments: {
				type: Number,
				default: 56
			},
			time: {
				type: String,
				default: "2025.10.25"
			}
		},
		data() {
			return {

			};
		}
	}
</script>

<style>
	.cardstyle {
		border: 1px solid #e5e5e5;
		border-radius: 5px;
		padding: 8px;
		margin: 5px;
		background-color: #e6f7ff;

	}

	.titlebox {
		font-size: 16px;
		line-height: 24px;
		font-weight: 450;
	}

	.tipsbox {
		display: flex;
		color: #888;
		font-size: 13px;
		gap: 15px;
	}
</style>